package com.huiquan.icd.domain;

import java.util.List;

public class IcdDiseaseSynonymy {
	
	private String id;

	private String std;
	
	private boolean isModifiedStd;
	
	private List<String> words;
	
	
	public IcdDiseaseSynonymy(String id, String std, boolean isModifiedStd, List<String> words) {
		super();
		this.id = id;
		this.std = std;
		this.isModifiedStd = isModifiedStd;
		this.words = words;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getStd() {
		return std;
	}

	public void setStd(String std) {
		this.std = std;
	}

	public boolean isModifiedStd() {
		return isModifiedStd;
	}

	public void setModifiedStd(boolean isModifiedStd) {
		this.isModifiedStd = isModifiedStd;
	}

	public List<String> getWords() {
		return words;
	}

	public void setWords(List<String> words) {
		this.words = words;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj){
			return true;
		}
		if (obj == null){
			return false;
		}
		if (getClass() != obj.getClass()){
			return false;
		}
		IcdDiseaseSynonymy other = (IcdDiseaseSynonymy) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id)){
			return false;
		}
		if (isModifiedStd != other.isModifiedStd){
			return false;
		}
		if (std == null) {
			if (other.std != null){
				return false;
			}
		} else if (!std.equals(other.std)){
			return false;
		}
		if (words == null) {
			if (other.words != null){
				return false;
			}
		}else{
			if(!(words.containsAll(other.words) && other.words.containsAll(words))){
				return false;
			}
		}
		return true;
	}
	
	

}